home *** CD-ROM | disk | FTP | other *** search
/ OpenGL Superbible (2nd Edition) / OpenGL SuperBible e2.iso / tools / Mesa-3.0 / SRC-GLUT / win32_glx.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-07-10  |  2.2 KB  |  65 lines

  1. #ifndef __win32_glx_h__
  2. #define __win32_glx_h__
  3.  
  4. /* Copyright (c) Nate Robins, 1997. */
  5.  
  6. /* This program is freely distributable without licensing fees 
  7.    and is provided without guarantee or warrantee expressed or 
  8.    implied. This program is -not- in the public domain. */
  9.  
  10. #include "win32_x11.h"
  11.  
  12. /* Type definitions (conversions). */
  13. typedef HGLRC GLXContext;
  14.  
  15. #define GLX_USE_GL              1       /* support GLX rendering */
  16. #define GLX_BUFFER_SIZE         2       /* depth of the color buffer */
  17. #define GLX_LEVEL               3       /* level in plane stacking */
  18. #define GLX_RGBA                4       /* true if RGBA mode */
  19. #define GLX_DOUBLEBUFFER        5       /* double buffering supported */
  20. #define GLX_STEREO              6       /* stereo buffering supported */
  21. #define GLX_AUX_BUFFERS         7       /* number of aux buffers */
  22. #define GLX_RED_SIZE            8       /* number of red component bits */
  23. #define GLX_GREEN_SIZE          9       /* number of green component bits */
  24. #define GLX_BLUE_SIZE           10      /* number of blue component bits */
  25. #define GLX_ALPHA_SIZE          11      /* number of alpha component bits */
  26. #define GLX_DEPTH_SIZE          12      /* number of depth bits */
  27. #define GLX_STENCIL_SIZE        13      /* number of stencil bits */
  28. #define GLX_ACCUM_RED_SIZE      14      /* number of red accum bits */
  29. #define GLX_ACCUM_GREEN_SIZE    15      /* number of green accum bits */
  30. #define GLX_ACCUM_BLUE_SIZE     16      /* number of blue accum bits */
  31. #define GLX_ACCUM_ALPHA_SIZE    17      /* number of alpha accum bits */
  32.  
  33. #define GLX_BAD_ATTRIB  2
  34. #define GLX_BAD_VISUAL  4
  35.  
  36. /* Functions emulated by macros. */
  37.  
  38. #define glXDestroyContext(display, context) \
  39.   wglDeleteContext(context)
  40.  
  41. #define glXSwapBuffers(display, window) \
  42.   SwapBuffers(GetDC(window))
  43.  
  44. #define glXMakeCurrent(display, window, context) \
  45.   wglMakeCurrent(GetDC(window), context)
  46.  
  47. /* Function prototypes. */
  48.  
  49. extern GLXContext glXCreateContext(
  50.   Display* display,
  51.   XVisualInfo* visinfo,
  52.   GLXContext share,
  53.   Bool direct);
  54. extern int glXGetConfig(
  55.   Display* display,
  56.   XVisualInfo* visual,
  57.   int attrib,
  58.   int* value);
  59. extern XVisualInfo* glXChooseVisual(
  60.   Display* display,
  61.   int screen,
  62.   int* attribList);
  63.  
  64. #endif /* __win32_glx_h__ */
  65.